import {
	createApp
} from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

import 'virtual:svg-icons-register';

import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';

import '@/theme/index';

const app = createApp(App);

app.use(store);
app.use(router);

app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.config.errorHandler = (error, vm, info) => {
  console.log(error, vm, info);
}

router.isReady().then(() => app.mount('#app'));
